#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
#import "Vector.h"

/*
Copyright 2007 Julian Asamer

This file is part of Fractalicious.

    Fractalicious is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Fractalicious is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Fractalicious.  If not, see <http://www.gnu.org/licenses/>.
*/

//By now, defines the control points (the DragablePoints). But it leaves room for extensions.
@class DistanceChecker;

@interface DragablePoint : Point2D
{
	float radius;
	id delegate;
	DistanceChecker * checker;
}

- (DragablePoint *)initWithx: (float) x y: (float) y;
- (void) addMaximumDistance:(float)d fromPoint: (Point2D *)p;
- (void) addMaximumDistance:(float)d fromPoint: (Point2D *)p withAcceleration: (float) a;
- (void)drawWithContext: (CGContextRef) context transform: trans;
- (void)setRadius: (float) r;
- (float) radius;
- (BOOL) pointInside: (Point2D *) p;
-(void) handleMove: (Vector2D *)v;
-(void) handleMouseUp;
- (void) setDelegate:(id) delegate;
- (id) delegate;
@end

@interface DragableLine : Line2D 
{
	id delegate;
}
-(id)initWithDragablePoint: (DragablePoint *) p andDragablePoint: (DragablePoint *) q;
-(id)initWithPoint: (Point2D *) q andDragablePoint: (DragablePoint *) q;
-(id)initWithDragablePoint: (DragablePoint *) q andPoint: (Point2D *) q;
- (void)drawWithContext: (CGContextRef) context transform: trans;
- (void) setDelegate:(id) delegate;
- (id) delegate;
- (BOOL) pointInside: (Point2D *) p;
-(void) handleMouseUp;



@end